<template>
    <div class="data-content">
        <el-descriptions
            class="margin-top"
            title="注册信息"
            :column="2"
            border
        >
            <el-descriptions-item>
                <template slot="label">    
                    纳税人名称
                </template>
                {{resultData.taxpayer_name}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                    纳税人识别号
                </template>
                {{resultData.taxpayer_number}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   组织机构代码
                </template>
                {{resultData.taxpayer_code}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                    注册地址
                </template>
                {{resultData.address}}
            </el-descriptions-item>

        </el-descriptions>

        <!-- -----------------------------分割线------------------------ -->

        <el-descriptions
            class="margin-top"
            title="案件信息"
            :column="2"
            border
        >
            <el-descriptions-item>
                <template slot="label">    
                    所属税务机关
                </template>
                {{resultData.responsible_department}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   案件性质
                </template>
                {{resultData.case_type}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   主要违法事实、相关法律依据及税务处理处罚情况
                </template>
                {{resultData.case_info}}
            </el-descriptions-item>
        </el-descriptions>

        <!-- -----------------------------分割线------------------------ -->

        <el-descriptions
            class="margin-top"
            title="相关人员及公司"
            :column="2"
            border
        >
            <el-descriptions-item>
                <template slot="label">    
                   法定代表人或负责人
                </template>
               {{resultData.legal_person_name}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   性别
                </template>
                {{resultData.legal_person_sex}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   证件名称
                </template>
               {{resultData.legal_person_id_type}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   证件号码
                </template>
                {{resultData.legal_person_id_number}}
            </el-descriptions-item>
        </el-descriptions>

         <!-- -----------------------------分割线------------------------ -->

         <el-descriptions
            class="margin-top"
            title=""
            :column="2"
            border
        >
            <el-descriptions-item>
                <template slot="label">    
                   负有责任的财务负责人
                </template>
                {{resultData.res_person_name}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   性别
                </template>
                {{resultData.res_person_sex}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   证件名称
                </template>
               {{resultData.res_person_id_type}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   证件号码
                </template>
                {{resultData.res_person_id_number}}
            </el-descriptions-item>
            <el-descriptions-item>
                <template slot="label">
                   负有直接责任的中介机构
                </template>
                {{resultData.department}}
            </el-descriptions-item>
        </el-descriptions>


    </div>
</template>

<script>
export default {
    props: {
        id: {
            type: [String,Number],
            default: "",
        },
    },
    data() {
        return {
            resultData: {},
        }
    },
    watch: {
        id (newValue, oldValue) {
            if(newValue != oldValue){
                this.queryData();
            }
        }
    },
    methods: {
        queryData() {
            var that = this;
            this.$ajax({
                type: "get",
                url: `${this.$store.state.api.searchUrl}/shuiwu/taxviolationdetail`,
                data: {
                    id:that.id
                },
                callback: function (data, res) {
                    this.resultData = data.result
                },
            });
        }
    },
    mounted () {
        this.queryData();
    },
}
</script>

<style scoped lang="scss">
    .margin-top {
        margin-top: 20px;

        ::v-deep tr th {
            width: 150px;
        }

        ::v-deep tr td {
            width: 400px;
        }
    }
</style>